import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Component({
  selector: 'app-card',
  templateUrl: './card.component.html',
  styleUrls: ['./card.component.scss']
})
export class CardComponent implements OnInit {
    public list:any[]=[];
    constructor (public http:HttpClient){}

    ngOnInit(): void {
        let url = 'http://localhost:3001/school/list';
        this.http.get(url).subscribe((response:any)=>{
            this.list = response;
        });
    }
}
